<?php echo $header; ?>
<div id="main">
   <?php echo $content_top; ?> 
   <div class="clear"></div> 
   <div id="left">
   		<div class="marginT5">
        	<?php if(!empty($advisory)){?>
                <h2 class="event"><span><?php echo $text_tu_van?></span></h2><span class="more"><a href="<?php echo $menu_tuvan;?>"><?php echo $text_seemore?></a></span>
                <?php $i=0; foreach($advisory as $item){if($i >= 4) break;?>
                <div class="box">
                    <a href="<?php echo $item["article_href"]?>"><img src="<?php echo $item["image"]?>" alt="<?php echo $item["article_title"] ?>"></a>
                    <strong><?php echo $item["article_title"] ?></strong>
                </div>
            <?php $i++;}}?>
            <div class="clear"></div>
            <div style="margin-top:10px"></div>
            <?php if(!empty($videos)){?>
            	<div class="panel-group clear" id="accordion">
                    <h2 class="event"><span><?php echo $text_video?></span></h2><span class="more"></span>
                    <div class="clear"></div>
                    <div class="padding10">
                    <?php $v =0 ; foreach($videos as $item){?>
                        <div class="panel panel-default  ">
                           <div class="panel-heading"><h4 class="panel-title"><a href="#collapse-coupon<?php echo $item["simple_blog_article_id"]?>" class="accordion-toggle"><?php echo $item["article_title"]?></a></h4></div>
                           <div id="collapse-coupon<?php echo $item["simple_blog_article_id"]?>" class="panel-collapse collapse <?php if($v==0){$v=1;echo 'active';}?>">
                              <div class="panel-body">
                                    <?php echo html_entity_decode($item["description"])?>
                              </div>
                           </div>
                        </div>
                        <?php } ?> 
                    </div>
                </div>
            <?php }?>
        </div>
   </div>
   <div id="right" style="text-align:center">
   		<?php if(!empty($news)){?>
            <h3><span><?php echo $text_news?></span></h3>
            <?php foreach($news as $item){ 
                echo '<a class="text_advertise" href="'.$item["article_href"].'">  <span class="time_news">'.$item["date_added"].' </span>'.$item["article_title"].'</a>';
            }?>
        <?php }?>
		<h3><span><?php echo $text_quang_cao?></span></h3>
   		<a  class="img_advertise" target="_blank" href="http://www.plusmainichi.vn"><img src="./public/img/logo-plusmainichi.jpg" /></a>
        <a class="img_advertise_last"target="_blank" href="http://www.organichouse.vn/"><img src="./public/img/organic-official-logo_300x240_1.jpg" /></a>
		<a class="img_advertise_last"target="_blank" href="http://pharmacity.vn/"><img width="225px" src="./image/catalog/Banners/nha-thuoc-online-logo.png" /></a>
		
   </div>
</div>
<?php echo $footer; ?>
<script>$(".accordion-toggle").click(function(){
	var $id = $(this).attr("href");
	var $id_active = "#"+$(".panel-collapse.active").attr("id");
	if($id == $id_active){
		$(".panel-collapse.active").slideToggle("normal",function(){$(".panel-collapse").removeClass("active");});
		
	}else{
		$(".panel-collapse.active").slideToggle("normal",function(){$(".panel-collapse.active").removeClass("active");});
		$($id).slideToggle("normal",function(){$($id).addClass("active");});
	}	
	return false;
});</script>